PeekBankWord
WordValue = PeekBankWord(BankNumber, AddressOffset)
 
Parameters:

    BankNumber = The Index Identifier of the bank that you wish to peek
    AddressOffset = The Address where you want to read this data from within the bank
Returns:

    WordValue = The Word value that was read from this bank
 

      PeekBankWord allows you to peek (read) a 16bit integer value from a memory bank.




FACTS:


      * 16Bit words and represent a numeric range from 0 to 65535
      * 16bit words values are NOT signed.
      * 16bit words are 2 bytes wide
      * Two 16bit words are the same length as 32bit Integer.




Mini Tutorial:


      This simple example Create a bank, pokes some WORD values into and then peek and display them.

  
  
; Create Memory Bank #1 and make it 1000 bytes in size
  CreateBank 1,1000
  
  
; Store some 16bit WORD values into the bank
;===========================================
  
; Poke the integer value 65000 into memory bank 1 at
; address offset 500
  
  PokeBankWord 150065000
  
; Poke next WORD value 23799 at 502. So it doesn't overwrite
; the previous poke.
  
  PokeBankWord 150223799
  
  
; Read and Display the previously poked value again.
  Print "Your Value:"+Str$(PeekBankWord(1,500))
  
; Read and Display the previously poke value again.
  Print "Your Value:"+Str$(PeekBankWord(1,502))
  
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  
  



This example would output.

  
  Your Value: 123456
  Your Value: 222333
  

 
Related Info: CreateBank | PeekBankByte | PeekBankFloat | PeekBankInt | PeekBankString | pointer | PokeBankByte | PokeBankFloat | PokeBankInt | PokeBankString | PokeBankWord :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com